Platform Explorer / Nuxeo Platform LTS 2016 8.10

Component org.nuxeo.ecm.directory.sql.storage

Contributions

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.ecm.directory.sql.storage">

  <require>org.nuxeo.ecm.platform.digestauth.config</require>

  <extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"
    point="directories">

    <directory name="userDirectory">

      <schema>user</schema>

      <types>
        <type>system</type>
      </types>

      <dataSource>jdbc/nxsqldirectory</dataSource>

      <table>users</table>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
      <autoincrementIdField>false</autoincrementIdField>
      <computeMultiTenantId>false</computeMultiTenantId>
      <dataFile>users.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <querySizeLimit>50</querySizeLimit>

      <!-- comment <cache* /> tags to disable the cache -->
      <cacheEntryName>sql-user-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-user-entry-cache-without-references</cacheEntryWithoutReferencesName>

      <references>
        <inverseReference field="groups" directory="groupDirectory"
          dualReferenceField="members" />
      </references>

    </directory>

    <directory name="groupDirectory">

      <schema>group</schema>
      <types>
        <type>system</type>
      </types>
      <dataSource>jdbc/nxsqldirectory</dataSource>
      <table>groups</table>
      <idField>groupname</idField>
      <dataFile>groups.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <autoincrementIdField>false</autoincrementIdField>

      <!-- comment <cache* /> tags to disable the cache -->
      <cacheEntryName>sql-group-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-group-entry-cache-without-references</cacheEntryWithoutReferencesName>

      <references>
        <tableReference field="members" directory="userDirectory"
          table="user2group" sourceColumn="groupId" targetColumn="userId" schema="user2group"
          dataFile="user2group.csv" />
        <!-- Warning ! From Nuxeo 5.3.1, a wrong setting has been fixed. See
        http://jira.nuxeo.org/browse/NXP-4401 . Nuxeo upgrades would need a fix in the
        database (inverting parentGroupId and childGroupId in the group2group)  -->
        <tableReference field="subGroups" directory="groupDirectory"
          table="group2group" sourceColumn="parentGroupId"
          targetColumn="childGroupId" schema="group2group" />
        <inverseReference field="parentGroups" directory="groupDirectory"
          dualReferenceField="subGroups" />
      </references>

    </directory>

  </extension>

  <extension target="org.nuxeo.ecm.directory.GenericDirectory" point="directories">

    <directory name="digestauth" extends="template-directory">
      <schema>digestauth</schema>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <types>
        <type>system</type>
      </types>
      <cacheEntryName>sql-digestauth-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-digestauth-entry-cache-without-references</cacheEntryWithoutReferencesName>
    </directory>

  </extension>
</component>